<#assign pageName="新增">
<#assign keywords="">
<#assign description="">

<@override name="head-styles">

</@override>
<@override name="page-content">
    <div class="page-header">
        <h1>
            ${pageName}
        </h1>
    </div>
    
    <div class="row">
        <div class="col-xs-12">
            <form novalidate="" onsubmit="return $('#formWfReflectAdd').valid()" id="formWfReflectAdd" class="form-horizontal" role="form" method="post">
                <@ctrl.Hidden path="wfReflect.id" />
                <@ctrl.Textbox path="wfReflect.reflectName" labelText="映射名称" />
                <@ctrl.Textbox path="wfReflect.requestUrl" labelText="请求地址" />
                <@ctrl.Textbox path="wfReflect.requestMethod" labelText="请求方法" />
                <@ctrl.Textbox path="wfReflect.ctrlName" labelText="控制类名称" />
                <@ctrl.Textbox path="wfReflect.responseUrl" labelText="请求后的响应地址" />
                <@ctrl.Textbox path="wfReflect.remark" labelText="备注" />
                <@ctrl.FormAction/>
            </form>
        </div>
    </div>
</@override>
<@override name="page-scripts">
    <script>
    $('#formWfReflectAdd').validate({
        errorElement: 'div',
        errorClass: 'help-block',
        focusInvalid: false,
        onsubmit: false,
        rules: {
            id : {
                required : true
            },
            reflectName : {
                required : true
            },
            requestUrl : {
                required : true
            },
            requestMethod : {
                required : true
            },
            ctrlName : {
                required : true
            },
            responseUrl : {
                required : true
            },
            remark : {
                required : true
            },
            colname : {
                required : true
            }
        },
        messages: {
            id : {
                required : "id不能为空!"
            },
            reflectName : {
                required : "映射名称不能为空!"
            },
            requestUrl : {
                required : "请求地址不能为空!"
            },
            requestMethod : {
                required : "请求方法不能为空!"
            },
            ctrlName : {
                required : "控制类名称不能为空!"
            },
            responseUrl : {
                required : "请求后的响应地址不能为空!"
            },
            remark : {
                required : "备注不能为空!"
            },
            colname : {
                required:  "不能为空！"
            }
        },
        highlight: function (e) {
            $(e).closest('.form-group').removeClass('has-info').addClass('has-error');
        },
        success: function (e) {
            $(e).closest('.form-group').removeClass('has-error');
            $(e).remove();
        },
        submitHandler: function (form) {
        },
        invalidHandler: function (form) {
            //验证失败触发的事件
        }
    });
    </script>
</@override>
<@extends name="/layout/basepage.html"/> 
